<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<title>GenomeTools - manual page for GT-SELECT(1)</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" href="..//style.css" type="text/css" />
</head>
<body>
<div id="menu">
<ul>
<li><a href="../index.html">Overview</a></li>
<li><a href="https://github.com/genometools/genometools/releases">Releases</a></li>
<li><a href="pub/">Archive</a></li>
<li><a href="https://github.com/genometools/genometools">Browse source</a></li>
<li><a href="http://github.com/genometools/genometools/issues/">Issue tracker</a></li>
<li><a href="../documentation.html">Documentation</a></li>
  <ul class="submenu">
    <li><a id="current" href="../tools.html">Tools</a></li>
    <li><a href="../manuals.html">Manuals</a></li>
    <li><a href="../libgenometools.html">C API</a></li>
    <li><a href="../docs.html"><tt>gtscript</tt> docs</a></li>
    <li><a href="../contract.html">Development Contract</a></li>
    <li><a href="../contribute.html">Contribute</a></li>
  </ul>
<li><a href="../annotationsketch.html"><tt>AnnotationSketch</tt></a></li>
<li><a href="../cgi-bin/gff3validator.cgi">GFF3 validator</a></li>
<li><a href="../license.html">License</a></li>
</ul>
</div>
<div id="main">
<div class="sect1">
<h2 id="_name">NAME</h2>
<div class="sectionbody">
<div class="paragraph"><p>gt-select - Select certain features (specified by the used options) from given GFF3 file(s).</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph"><p><strong>gt select</strong> [option &#8230;] [GFF3_file &#8230;]</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>-retainids</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
when available, use the original IDs provided in the source file
(memory consumption is proportional to the input file size(s)) (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-seqid</strong> [<em>string</em>]
</dt>
<dd>
<p>
select feature with the given sequence ID (all comments are selected).  (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-source</strong> [<em>string</em>]
</dt>
<dd>
<p>
select feature with the given source (the source is column 2 in regular GFF3 lines) (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-contain</strong> [<em>start</em> <em>end</em>]
</dt>
<dd>
<p>
select all features which are contained in the given range (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-overlap</strong> [<em>start</em> <em>end</em>]
</dt>
<dd>
<p>
select all features which do overlap with the given range (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-strand</strong> [<em>string</em>]
</dt>
<dd>
<p>
select all top-level features(i.e., features without parents) whose strand equals the given one (must be one of <em>+-.?</em>) (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-targetstrand</strong> [<em>string</em>]
</dt>
<dd>
<p>
select all top-level features (i.e., features without parents) which have exactly one target attribute whose strand equals the given one (must be one of <em>+-.?</em>) (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-targetbest</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
if multiple top-level features (i.e., features without parents) with exactly one target attribute have the same target_id, keep only the feature with the best score. If -targetstrand is used at the same time, this option is applied after -targetstrand.
Memory consumption is proportional to the input file size(s). (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-hascds</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
select all top-level features which do have a CDS child (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-maxgenelength</strong> [<em>value</em>]
</dt>
<dd>
<p>
select genes up to the given maximum length (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-maxgenenum</strong> [<em>value</em>]
</dt>
<dd>
<p>
select the first genes up to the given maximum number (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-mingenescore</strong> [<em>value</em>]
</dt>
<dd>
<p>
select genes with the given minimum score (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-maxgenescore</strong> [<em>value</em>]
</dt>
<dd>
<p>
select genes with the given maximum score (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-minaveragessp</strong> [<em>value</em>]
</dt>
<dd>
<p>
set the minimum average splice site probability (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-rule_files</strong> 
</dt>
<dd>
<p>
specify Lua filter rule files to be used for selection (terminate list with <em>--</em>)
</p>
</dd>
<dt class="hdlist1">
<strong>-rule_logic</strong> [<em>&#8230;</em>]
</dt>
<dd>
<p>
select how multiple Lua files should be combined
choose from AND|OR (default: AND)
</p>
</dd>
<dt class="hdlist1">
<strong>-dropped_file</strong> [<em>filename</em>]
</dt>
<dd>
<p>
save non-selected features to file (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-v</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
be verbose (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-o</strong> [<em>filename</em>]
</dt>
<dd>
<p>
redirect output to specified file (default: undefined)
</p>
</dd>
<dt class="hdlist1">
<strong>-gzip</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
write gzip compressed output file (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-bzip2</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
write bzip2 compressed output file (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-force</strong> [<em>yes|no</em>]
</dt>
<dd>
<p>
force writing to output file (default: no)
</p>
</dd>
<dt class="hdlist1">
<strong>-help</strong> 
</dt>
<dd>
<p>
display help and exit
</p>
</dd>
<dt class="hdlist1">
<strong>-version</strong> 
</dt>
<dd>
<p>
display version information and exit
</p>
</dd>
</dl></div>
<div class="paragraph"><p>File format for option <em>-rule_files</em>:</p></div>
<div class="paragraph"><p>The files supplied to option <em>-rule_files</em> define a function for
filtering by user given criteria (see example below):</p></div>
<div class="literalblock">
<div class="content">
<pre><tt>function filter(gn)
  target = "exon"
  for curnode in gn:children() do
    if (curnode:get_type() == target) then
      return false
    end
  end
  return true
end</tt></pre>
</div></div>
<div class="paragraph"><p>The above function iterates over all children of <em>gn</em> and
checks whether there is a node of type <em>exon</em>. If there is such a
node the function returns <em>false</em>, indicating that the parent node
<em>gn</em> will not be sorted out.</p></div>
<div class="paragraph"><p>NOTE:
The function must be named <em>filter</em> and must return <em>false</em>,
indicating that the node survived the filtering process.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_reporting_bugs">REPORTING BUGS</h2>
<div class="sectionbody">
<div class="paragraph"><p>Report bugs to <a href="https://github.com/genometools/genometools/issues">https://github.com/genometools/genometools/issues</a>.</p></div>
</div>
</div>
<div id="footer">
Copyright &copy; 2007-2023 The <i>GenomeTools</i> authors.
</div>
</div>
</body>
</html>
